<!--
指令
    ng-app   模块
    ng-controller  控制器：中间件，视图和模型的装饰器

    ng-cloak 解决表达式闪屏
    ng-model
    ng-bind：块级元素上
    ng-click
    ng-value : 表单上-表达式
    ng-show：显示true 与隐藏false

    ng-true-value 选中时候的值
    ng-false-value 取消时候的值

    ng-options 构造下拉列表的options
视图模型 $scope
双向数据绑定
-->
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>下拉列表select</title>
    <script src="../1.6.9/angular.min.js"></script>
</head>
<body>
<div ng-app="hd" ng-controller="ctrl">
    <select ng-options="v.valu as v.nam for v in data" ng-model="city">
        <option value="">请选择城市</option>
    </select>
    {{city}}
</div>
<script>
    var m = angular.module('hd', []);
    m.controller('ctrl', ['$scope', function ($scope) {
        $scope.city = 'beijing';//第一次作为默认值
        $scope.data = [
            {nam: '后盾网', valu: 'houdunwang'},
            {nam: '北京', valu: 'beijing'},
            {nam: '南京', valu: 'nanjing'},
        ];
    }]);
</script>
</body>
</html>